from django.shortcuts import render

# Create your views here.

from django.views.generic.edit import FormView

from parsefile.service.forms import FileFiledForm

# class FileFieldView(FormView):
#     form_class = FileFiledForm
#
#     def post(self, request, *args, **kwargs):
#         form_class=self.get_form_class()
#         form = self.get_form(form_class)
#         files=request.FILES.getlist('file_field')
#         if form.is_valid():
#             for f in files:
#                 pass
#             return self.form_valid(form)
#         else:
#             return self.form_valid(form)

from rest_framework import viewsets

from .models import UploadStatus
from .serializer import UploadStatusSerializer

class FileUploadStatusViewSet(viewsets.ModelViewSet):
    queryset = UploadStatus.objects.all()
    serializer_class = UploadStatusSerializer

